package com.sophossystems.client.asmon.dto;

import java.io.Serializable;


/** 
 * This class represents the primary key of the REPRESENTANTE_LEGAL table.
 */
public class RepresentanteLegalPkDTO implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -6162922378849613140L;

	protected int idRepLegal;

	/** 
	 * This attribute represents whether the primitive attribute idRepLegal is null.
	 */
	protected boolean idRepLegalNull;

	/** 
	 * Sets the value of idRepLegal
	 */
	public void setIdRepLegal(int idRepLegal)
	{
		this.idRepLegal = idRepLegal;
	}

	/** 
	 * Gets the value of idRepLegal
	 */
	public int getIdRepLegal()
	{
		return idRepLegal;
	}

	/**
	 * Method 'RepresentanteLegalPk'
	 * 
	 */
	public RepresentanteLegalPkDTO()
	{
	}

	/**
	 * Method 'RepresentanteLegalPk'
	 * 
	 * @param idRepLegal
	 */
	public RepresentanteLegalPkDTO(final int idRepLegal)
	{
		this.idRepLegal = idRepLegal;
	}

	/** 
	 * Sets the value of idRepLegalNull
	 */
	public void setIdRepLegalNull(boolean idRepLegalNull)
	{
		this.idRepLegalNull = idRepLegalNull;
	}

	/** 
	 * Gets the value of idRepLegalNull
	 */
	public boolean isIdRepLegalNull()
	{
		return idRepLegalNull;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	@Override
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof RepresentanteLegalPkDTO)) {
			return false;
		}
		
		final RepresentanteLegalPkDTO _cast = (RepresentanteLegalPkDTO) _other;
		if (idRepLegal != _cast.idRepLegal) {
			return false;
		}
		
		if (idRepLegalNull != _cast.idRepLegalNull) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	@Override
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idRepLegal;
		_hashCode = 29 * _hashCode + (idRepLegalNull ? 1 : 0);
		return _hashCode;
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	@Override
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.sophossystems.client.asmon.dto.RepresentanteLegalPk: " );
		ret.append( "idRepLegal=" + idRepLegal );
		return ret.toString();
	}

}
